home *** CD-ROM | disk | FTP | other *** search
/ Freesoft 1997 May / Freesoft_1997-05_cd.bin / nerecenz / network, comunications / ZOW / INSTALL.FIL / SCRIPT / ZOCEVENT.DOC < prev    next >
Text File  |  1996-10-26  |  3KB  |  76 lines

  1.  
  2. ---------------------------------------------------------------------------
  3. 1) HOW TO USE ZOCEVENT.ZRX
  4. ---------------------------------------------------------------------------
  5.  
  6.    The ZOCEVENT.ZRX file is called at certain points in ZOC (with the
  7.    parameters identifying the event shown in the table below).
  8.  
  9.    The ZOCEVENT file can, for example, be used to turn off a fax program
  10.    before ZOC will try to access the com port and turn fax receive mode 
  11.    back on when ZOC exits (OS/2's FaxWorks offers such a feature via the
  12.    FXRCV.EXE program, as shown in the sample ZOCEVENT.ZRX file).
  13.  
  14.  
  15.  
  16. ---------------------------------------------------------------------------
  17. 2) CALL PARAMETERS
  18. ---------------------------------------------------------------------------
  19.  
  20.    ----------------------------  ------------------------------------------
  21.    EVENT                         PARAMETER(S)
  22.    ----------------------------  ------------------------------------------
  23.    ZOC Start                     OPEN
  24.    Before a device is opened     DEVOPEN '<device name>' '<device opts>'
  25.    After a device was closed     DEVCLOSE '<device name>' 
  26.    ZOC Ends                      CLOSE
  27.    ----------------------------  ------------------------------------------
  28.  
  29.    The DeviceName is the same as it appears in ZOC, but always in upper
  30.    case letters (eg. SERIAL/MODEM).
  31.  
  32.    The DeviceOpts are undocumented, so you need a bit of experimenting
  33.    with them (see the debugging section below).  However, since they are 
  34.    probably only used to determine the com port, here is how to parse 
  35.    the SERIAL/MODEM options:
  36.  
  37.    /* ZOCEVENT.ZRX */
  38.    PARSE ARG Event " '" DeviceName "'" "'" DeviceOpts "'"
  39.  
  40.    /* if serial, get com port */
  41.    IF Event="DEVOPEN" & DeviceName="SERIAL/MODEM" THEN DO
  42.        PARSE VALUE DeviceOpts WITH "[" id "]" serport ":" baud "-" opts "|" 
  43.        serport= TRANSLATE(serport)  /* uppercase */
  44.        CALL LINEOUT "zocevent.trc", "OPEN OF "serport" DETECTED"
  45.    END /* IF */
  46.  
  47.  
  48.  
  49. ---------------------------------------------------------------------------
  50. 3) SPECIAL PROGRAMMING ISSUES
  51. ---------------------------------------------------------------------------
  52.  
  53.    You can call all of the ZOC commands.  However, not many will make
  54.    sense in the environment in which ZOCEVENT.ZRX is called, because
  55.    no communication device is open and (in case of OPEN and CLOSE) not
  56.    even a ZOC window is there.
  57.  
  58.  
  59.  
  60. ---------------------------------------------------------------------------
  61. 4) DEBUGGING
  62. ---------------------------------------------------------------------------
  63.  
  64.    If no ZOC window is there, SAY or TRACE will pop up a message window
  65.    with the message you want to show.  As this makes debugging a bit
  66.    tedious, you can write debugging output to a file with REXX's 
  67.    lineout command:
  68.  
  69.       CALL LINEOUT "zocevent.trc", event "#" DeviceName "#" DeviceOpts
  70.  
  71.    Under OS/2 you can call the script from the command line with the 
  72.    same parameters that ZOC would use, eg.:
  73.  
  74.       C:\ZOC> SCRIPT\ZOCEVENT "DEVOPEN" "SERIAL/MODEM" "[1]COM3:38400-8N1|"
  75.  
  76.